﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MyFramework
{
    /// <summary>
    /// 开发环境（1.开发 ；2.测试 ；3.发布）
    /// </summary>
    public enum EnvironmentMode
    {
        Developing,
        Test,
        Production

    }
    public abstract class MainManager : MonoBehaviour
    {
        public EnvironmentMode Mode;

        private static EnvironmentMode mShareMode;
        private static bool mIsSetMode = false;
        private void Start()
        {
            if (mIsSetMode==false)
            {
                mShareMode = Mode;
                mIsSetMode = true;
            }
            switch (mShareMode)
            {
                case EnvironmentMode.Developing:
                    LaunchInDevelopingMode();
                    break;
                case EnvironmentMode.Test:
                    LaunchInTestMode();
                    break;
                case EnvironmentMode.Production:
                    LaunchInProductionMode();
                    break;
                default:
                    break;
            }
        }
        protected abstract void LaunchInDevelopingMode();

        protected abstract void LaunchInTestMode();

        protected abstract void LaunchInProductionMode();
    }
}